<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>flex布局</title>
    <style>
        .container {
            border: 1px solid #000;
            width: 400px;
            height: 500px;
            margin-left: 20px;
            margin-top: 20px;
            display: flex;

            /* flex-direction: row; */
            /* justify-content: flex-start; */
            /* align-items: stretch; */
            flex-wrap: wrap;
            /* align-content: flex-start; */
        }

        .item {
            width: 100px;
            /* height: 100px; */
            height: auto;
            font-size: 50px;
            text-align: center;
            line-height: 100px;
            color: #fff;
        }

        .item:nth-of-type(1) {
            background-color: #f00;
            /* flex-grow: 2; */
        }

        .item:nth-of-type(2) {
            background-color: #0f0;
            /* flex-grow: 1; */
            /* order: -1; */
            /* align-self: flex-start; */
        }
        
        .item:nth-of-type(3) {
            background-color: #00f;
            /* flex-grow: 1; */
            /* align-self: flex-end; */
        }
        
        .item:nth-of-type(4) {
            background-color: #ff0;

        }

        .item:nth-of-type(5) {
            background-color: #f0f;
        }

        .item:nth-of-type(6) {
            background-color: #000;
        }

    </style>
</head>
<body>
    <div class="container">
        <div class="item">1</div>
        <div class="item">2</div>
        <div class="item">3</div>
        <div class="item">4</div>
        <div class="item">5</div>
        <div class="item">6</div>
    </div>
    123456
</body>
</html>